home *** CD-ROM | disk | FTP | other *** search
- /*
- ** STAT.C [edit EMAIL.H before compiling]
- **
- ** This (console mode) program dislays the number
- ** of email messages waiting on the SMTP server.
- */
-
- #include <windows.h>
- #include <stdio.h>
- #include "see.h"
-
- #include "email.h"
-
- static char Buffer[512];
-
- void ErrorExit(int Code)
- {seeErrorText(Code,(LPSTR)Buffer,512);
- printf("SEE Error %d: %s\n", Code, Buffer);
- exit(1);
- }
-
- void main(void)
- {int Code;
- /* define diagnostics log file */
- ///seeStringParam(SEE_LOG_FILE, (LPSTR)"stat.log");
- /* connect to POP3 server */
- puts("Connecting...");
- Code = seePop3Connect(
- (LPSTR)POP3_HOST_NAME, /* POP3 server */
- (LPSTR)POP3_USER_NAME, /* user */
- (LPSTR)POP3_PASSWORD); /* Password */
- if(Code<0) ErrorExit(Code);
- /* get # messages waiting */
- puts("Getting message status...");
- Code = seeGetEmailCount();
- if(Code<0) ErrorExit(Code);
- printf("%d messages waiting\n", Code);
- seeClose();
- } /* end main */
-
-
-